package com.hongfeng.support.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.hongfeng.support.model.common.BaseEntity;

/**
 * 
 * <权限类>
 *
 * @author llc
 * @date 创建时间：2012-12-5 下午04:39:09
 */
@Entity
@Table(name = "sys_purview")
public class Purview extends BaseEntity {

	private static final long serialVersionUID = 6284138200905980854L;

	@Id
	@GeneratedValue
	private Long id;
	// 角色
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "role_id")
	private Role role;
	// 菜单
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "menu_id")
	private Menu menu;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public Menu getMenu() {
		return menu;
	}

	public void setMenu(Menu menu) {
		this.menu = menu;
	}

}
